struct comp_arista
{
   equival buscado;
   comp_arista( equival n ): buscado( n ) { }
   bool operator()( const equival& base ) const 
   {
   return (base.local == buscado.local && base.externa == buscado.externa);
  //  ||    (base.externa == buscado.local && base.local   == buscado.externa) ;
   }
};

struct look_vertice_name
{
   point buscado;
   look_vertice_name( point n ): buscado( n ) { }
   bool operator()( const point& database ) const 
   {
   return database.name == buscado.name ;
   }
};

struct as_name
{
   point buscado;
   as_name( point n ): buscado( n ) { }
   bool operator()( const point& database ) const 
   {
   return database.name == buscado.name ;
   }
};

ostream &operator<<(ostream &stream, vector<struct ptcl> halo)
{
	int i;
	stream << halo.size() << '\n';
	for(i=0;i<halo.size();i++)
	{
		stream << halo[i].Pos[0] << "  ";
		stream << halo[i].Pos[1] << "  ";
		stream << halo[i].Pos[2] << "  ";
		stream << halo[i].Vel[0] << "  ";
		stream << halo[i].Vel[1] << "  ";
		stream << halo[i].Vel[2] << "  ";
		stream << halo[i].Id     << "  ";
		stream << halo[i].Idgrupo  << '\n';
	}
	return stream;
};
